package com.itheima.sentinel;

import com.alibaba.csp.sentinel.slots.block.BlockException;
import com.alibaba.fastjson.JSONObject;
import com.itheima.utils.ResultUtils;

import java.util.Map;

public class CommonBlockHandler {

    public static JSONObject handlerException(Map params, BlockException exception){
        return ResultUtils.failureMsg("=====被限流了====" + exception);
    }

    public static JSONObject handlerException2(Integer id, BlockException exception){
        return ResultUtils.failureMsg("=====被限流了====" + exception);
    }
}
